import { createApp } from 'vue'
import App from './App.vue'
import router from './router' // 引入路由配置
import { createPinia } from 'pinia' // 引入 Pinia

import './style.css'

import {
  create,
  NDialog,
  NModal,
  NForm,
  NFormItem,
  NButton,
  NInput,
  NFlex,
  NIcon,
  NGrid,
  NGi,
  NImage
} from 'naive-ui'

const naive = create({
  components: [
    NDialog,
    NModal,
    NForm,
    NFormItem,
    NButton,
    NInput,
    NFlex,
    NIcon,
    NGrid,
    NGi,
    NImage
  ]
})

const app = createApp(App)

// 挂载 Pinia
app.use(createPinia())

// 使用路由
app.use(router)

app.use(naive)

app.mount('#app')